package queries;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;

import entitys.Employee;


public class GetSalesPersonQuery {

	public static ArrayList<String> exe(Connection conn) {
		ArrayList<String> arr = new ArrayList<String>();
		ResultSet res = null; 
		Statement stmt;
		
			
			try {
				stmt = conn.createStatement();
				res = stmt.executeQuery("SELECT employee.userid FROM ccrm.employee WHERE employee.position='S'; ");
				while(res.next())
				{
					
					arr.add(res.getString(1));
				
				}
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		return arr;
	}
	
}
